//导入vue和vuex
import Vue from 'vue'
import Vuex from 'vuex'

import cart from './cart.js'
import user from './user.js'

//将Vuex安装为vue插件
Vue.use(Vuex)

//创建Store实例对象
const store = new Vuex.Store({
	modules: {
		myCart: cart,
		myUser: user
	}
})

//向外共享Store的实例对象
export default store